﻿using KingsSharp.Common.Data;
using KingsSharp.Core;
using CRM.Admin.Contracts.Model.Sys;
using CRM.Admin.Contracts.Dto.Sys;
using System;
using System.Linq;


namespace CRM.Admin.Contracts.Contract.Sys
{
    /// <summary>
    /// 组织机构业务契约
    /// </summary>
    public interface IOrganizationService : IDependency
    {
        /// <summary>
        /// 机构集合
        /// </summary>
        IQueryable<Organization> ItemOrganization { get; }

        /// <summary>
        /// 新增机构
        /// </summary>
        /// <param name="dtos">机构信息dto</param>
        /// <returns></returns>
        OperationResult InsertOrganization(params OrganizationDto[] dtos);

        /// <summary>
        /// 编辑机构
        /// </summary>
        /// <param name="dtos">机构信息dto</param>
        /// <returns></returns>
        OperationResult UpdateOrganization(params OrganizationDto[] dtos);

        /// <summary>
        /// 删除指定机构
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        OperationResult DeleteOrganization(params Guid[] ids);
    }
}
